using UnityEditor;
using UnityEditor.ProjectWindowCallback;
using UnityEngine.Rendering;

public class VForwardRendererData : VScriptableRendererData
{
    #region Create Asset
#if UNITY_EDITOR
    internal class CreateVForwardRendererAsset : EndNameEditAction
    {
        public override void Action(int instanceId, string pathName, string resourceFile)
        {
            var instance = CreateInstance<VForwardRendererData>();
            AssetDatabase.CreateAsset(instance, pathName);
            ResourceReloader.ReloadAllNullIn(instance, VUniversalRenderPipelineAsset.packagePath);
            Selection.activeObject = instance;
        }
    }

    [MenuItem("Assets/Create/V Rendering/Render Pipeline/V Forward Renderer")]
    static void CreateCustomForwardRendererData()
    {
        ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, CreateInstance<CreateVForwardRendererAsset>(), "VForwardRendererData.asset", null, null);
    }
#endif
    #endregion

    protected override VScriptableRenderer Create()
    {
        return new VForwardRenderer();
    }
}
